'use strict';
const fs = require('fs');
const path = require('path');

module.exports = app => {

  const config = exports = {
    
    siteFile: {
      '/favicon.ico': fs.readFileSync(path.join(app.baseDir, 'app/web/asset/favicon.ico')),
    },

    view: {
      cache: false,
    },

    vuessr: {
      layout: path.join(app.baseDir, 'app/web/view/layout.html'),
      renderOptions: {
        basedir: path.join(app.baseDir, 'app/view'),
      },
    },

    logger: {
      consoleLevel: 'DEBUG',
      dir: path.join(app.baseDir, 'logs'),
    },

    static: {
      prefix: '/public/',
      dir: path.join(app.baseDir, 'public'),
    },

    cluster: {
      listen: {
        port: 18082,
      },
    },

    keys: '_1556903375746',
    middleware: [],

    mongoose: {
      url: 'mongodb://127.0.0.1:27017/leexiaohui-resume-dev_1',
    },
  };

  return config;
};
